FILE(GLOB EXAMPLE_DIRS "*")

FOREACH(DIR ${EXAMPLE_DIRS})
  IF(IS_DIRECTORY ${DIR})
    ADD_SUBDIRECTORY(${DIR})
  ENDIF()
ENDFOREACH()